package xiaodou.utils
{
	import flash.net.SharedObject;

	public class SharedUtil
	{
		public static var local:String = "sssfdadsfwewe";
		
		public static function add(key:*, value:*):void
		{
			if(local == null)
				throw new Error("local is null");
			SharedObject.getLocal(local).data[key] = value;
		}
		
		public static function remove(key:*):void
		{
			if(local == null)
				throw new Error("local is null");
			delete SharedObject.getLocal(local).data[key];
		}
		
		public static function getValue(key:*):*
		{
			if(local == null)
				throw new Error("local is null");
			return SharedObject.getLocal(local).data[key];
		}
	}
}